<template>
  <div id="bar"></div>
</template>

<script setup lang="ts">
import { getCurrentInstance } from "vue";
import option from "./options";
const { proxy } = getCurrentInstance() as any;
onMounted(() => {
  const echarts = proxy.$echarts;
  const myEcharts = echarts.init(document.getElementById("bar"));
  myEcharts.setOption(option.bar);
  window.onresize = function () {
    myEcharts.resize();
  };
});
</script>

<style scoped>
#bar {
  width: 100%;
  height: 100%;
}
</style>
